void ReplaceBlank(char string[], int length)
{
    if (string == NULL || length <= 0)
        return;
    int originalLength = 0;
    int numOfBlank = 0;
    int i = 0;

    for (;string[i] != '\0'; i++){
        originalLength++;  //注意要求出真正的长度 string的长度是总长度
        if(string == ' '){
            numOfBlank++;
        }
    }

    int newLength = originalLength + 2*numOfBlank;
    if(newLength > length)   //检查新长度是否超界 注意！！
        return ;
    int indexOfOriginal = originalLength;
    int indexOfNew = newLength;
    while(indexOfOriginal >= 0 && indexOfNew > indexOfOriginal)
    {
        if(string[indexOfOriginal] == ' '){
            string[indexOfNew--] = '0';
            string[indexOfNew--] = '2';
            string[indexOfNew--] = '%';
        }
        else
            string[indexOfNew--] =string[indexOfOriginal];
        --indexOfOriginal;
    }
    return 0;
}